home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / source / cplasma / readme.1st < prev    next >
Encoding:
Text File  |  1995-03-31  |  4.6 KB  |  109 lines

  1.     CPlasma v1.0 -- Polar Based Plasma
  2.  
  3.     By Jason Trowbridge
  4.  
  5. -----
  6. Intro
  7. -----
  8.     A couple of years ago, when the plasma algorithms first started 
  9. showing up, I noticed that the plasma was based upon a rectangle.  Take a 
  10. good look close up on a smooth plasma, and you can see all sorts of edges 
  11. in the colors.  This is because most plasma algorithms uses cartesian 
  12. coordinates, an (x,y) way of determaining position.  This is done 
  13. because monitors use cartesian coordinates.  It's easiest.
  14.     But I wondered: what about circle based plasma?  Would it look 
  15. the same?  This program is the result.
  16.     I think it looks like some sort of explosion.  That's why I added 
  17. the palette rotations--to see what it would look like "animated."
  18.     Instead of creating points from (x1,y1) and (x2, y2), I create 
  19. points from (Angle1, Radius1) to (Angle2, Radius2).  However, it really 
  20. uses the same _essential_ technique as the regular plasma.  I just use an 
  21. angle and radius.  For each radius R that I figure outwards, I do the 
  22. following:
  23.   1)  To figure out angle 2, which is between angle 1 and angle 3, I take 
  24. the average of the pixel at angle 1 and angle 3.
  25.   2)  I add/subtract an amount of randomness.  The amount of randomness 
  26. that is added/subtracted is based upon the chord length between the two 
  27. pixels.  Note that it is the chord length, not a simple distance formula.
  28.   3)  Then, I figure out the pixel between angle 1 and angle 2, as well 
  29. as the pixel between angle 2 and angle 3.  I do this, of course, recursively.
  30.  
  31. ----------
  32. Running It
  33. ----------
  34.     When the program is first run, there's several questions that 
  35. must be first answered.  The defaults run fine, but here's what each of 
  36. them do....
  37.  
  38.     RandSeed
  39.     If you enter a number here, and you like the result, 
  40. you can enter the same number here and get the exact same result.
  41.  
  42.     Roughness
  43.     This number determines how rough the plasma is.  The higher the 
  44. number, the rougher the plasma.
  45.  
  46.     Radii
  47.     This is the radius, in pixels.  The maximum radius is 100 pixels.
  48.  
  49.     Fadeout
  50.     Fadeout controls how much the plasma darkens as it gets near the 
  51. edges of the radius.
  52.  
  53.     Ejection
  54.     The ejection angle is the minimum angle that the plasma will 
  55. compute.  For large plasmas, you'll want a very small value.  For small 
  56. plasmas, you can have a large ejection value without any trouble.  If the 
  57. ejection value is too high, you'll have spots in your plasma which are 
  58. not figured out.  It'll look kind of weird.  If the ejection value is too 
  59. small, it won't affect the plasma any.  However, it will increase the 
  60. time the program takes to generate the plasma.
  61.  
  62.     Palette Delay
  63.     This will speed up/slow down the rate at which the palette 
  64. rotates.  The higher the delay, the slower it goes.
  65.  
  66.     Screen Aspect
  67.     The VGA mode 13hex is not particularly well suited for circles.  
  68. The pixels aren't squares, so circles look like elipses.  If you answer 
  69. "Y"es to this question, the plasma will be distorted to look circular.
  70.  
  71.     Random Endpoints
  72.     If you don't want this, then the endpoints of the axis of the 
  73. plasma will be black.  It'll have the effect of slightly darkening and 
  74. distorting the plasma.  The center will be white with this turned off.  
  75. With this on, the endpoints are set at random.
  76.  
  77.     Random Center
  78.     If you selected that you want random endpoints, you'll also get 
  79. to choose whether or not to have a random center.
  80.  
  81.     Then, the plasma will be drawn.  After it is done, you'll here a 
  82. beep.  Just press a key.
  83.     The screen will become blue for about a second.  You'll be able to see  
  84. if your ejection value was too small.  If it was, you'll see bits of blue 
  85. showing from behind the plasma.
  86.     Then, the screen will go dark, and the palette will rotate 
  87. through and fade out.  Press any key to do it again.  Press the <ESC> or 
  88. the 'Q' key in order to quit to the next palette rotation.
  89.     To stop any of these palette rotations, just hit any key.
  90.  
  91. ----------
  92. In Closing
  93. ----------
  94.     That's all of the program.  The source code is included.  It does 
  95. exactly what the EXE does.
  96.     Go ahead, distribute this.  It's not exactly optimized, or even 
  97. well written.  But it works, and I've yet to see a program that does 
  98. this, so I'm releasing it to everyone.  You can use parts of the code in 
  99. your code.  However, you may not modify the source code, then redistribute it.  
  100. You must include this file, the original executable, and the original source 
  101. code when distributing this program.  You can't charge money for this 
  102. program.  This program is presented "as is" and with all defects.  The 
  103. programmer may not be held liable for damage to data, property, and 
  104. various inhabited planets due to this program.
  105.  
  106.     Contact me if you like it!
  107.     jrsx03b@prodigy.com
  108.     trowbri@unm.edu  <-  Soon to change....
  109.